package com.bd08.flink.demo

import org.apache.flink.core.fs.Path
import org.apache.flink.streaming.api.scala.{StreamExecutionEnvironment, createTypeInformation}
import org.apache.flink.api.java.io.TextInputFormat
import org.apache.flink.streaming.api.functions.source.FileProcessingMode

object FileDemo extends App {
  val env = StreamExecutionEnvironment.getExecutionEnvironment
  val path = "D:\\yahu\\flink-demo2\\src\\main\\resources\\"
  val ds = env.readFile( new TextInputFormat(new Path(path)), path,FileProcessingMode.PROCESS_CONTINUOUSLY,10000)
  ds.print()
  env.execute

}
